home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
- #
- # Preferences.c
- #
- # This code handles loading and saving DropEncoder's preferences into the Preferences
- # folder.
- #
- # Author: Timothy Carroll
- # Apple Developer Technical Support
- # timc@apple.com
- #
- # Revision: Jason Yeo
- #
- # Modification History:
- #
- # 2/9/97 TMC Initial Release
- #
- # 9/12/97 JY Updated for:
- # TEC 1.2.1
- # Universal Interfaces 3.0
- # CodeWarrior 11 projects
- #
- # Copyright © 1997 Apple Computer, Inc., All Rights Reserved
- #
- #
- # You may incorporate this sample code into your applications without
- # restriction, though the sample code has been provided "AS IS" and the
- # responsibility for its operation is 100% yours. However, what you are
- # not permitted to do is to redistribute the source as "DSC Sample Code"
- # after having made changes. If you're going to re-distribute the source,
- # we require that you make it clear in the source that the code was
- # descended from Apple Sample Code, but that you've made changes.
- #
- *************************************************************************************/
-
- #include "shell.h"
- #include "preferences.h"
- #include "TextCommon.h"
-
- OSStatus ReadPreferencesFile (TPreferences *prefs)
- {
-
- return paramErr;
- }
-
- OSStatus WritePreferencesFile (TPreferences *prefs)
- {
-
- return noErr;
- }
-
- OSStatus SetDefaultPreferences (TPreferences *prefs)
- {
- prefs->version = 0;
-
- // By default, we just go to the default UNICODE.
- prefs->outputEncoding = CreateTextEncoding (kTextEncodingMacJapanese,
- kTextEncodingDefaultVariant,
- kTextEncodingDefaultFormat);
-
- prefs->locale = verJapan;
- return noErr;
- }
-
- OSStatus EditPreferences (TPreferences *prefs)
- {
-
- SetDefaultPreferences (prefs);
- WritePreferencesFile (prefs);
-
- return noErr;
- }